﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using X.Core.Bases;

namespace X.Core.Interfaces
{
    public interface IModel : INotifyPropertyChangedEx,IDisposable, ICloneable
    {
        /// <summary>
        /// Id
        /// </summary>
        Guid Id { get; set; }
        Guid InternalId { get; set; }
        /// <summary>
        /// 显示序号
        /// </summary>
        int Index { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        string Name { get; set; }
        string Label { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        string Description { get; set; }
        /// <summary>
        /// 启用
        /// </summary>
        bool IsEnabled { get; set; }
        bool IsModelInitialized { get; set; }
        bool CanNotify { get; set; }
        bool IsChanged { get; set; }
        int Group { get; set; }
        int GroupSub { get; set; }

        (int, string) Init(JObject obj = null);
        (int, string) Fill<T>(T source, bool isCheckType = true,IEnumerable<string> ignorePropList = null) where T : IModel;
    }
}
